/* object.assign 拷贝对象，但是只能拷贝一层数据，深层数据还是同一内存地址 */
const assignA = {
  a: 123,
  b: 456,
  c: {
    a: 1,
  }
}
const assignB = {
  a: 234,
  c: 345,
}
const assignC = {
  d: 567,
  b: 890,
}
// console.log(Object.assign(assignA, assignB, assignC))

function f (obj) {
  const o = Object.assign({}, obj)
  o.c = 'aaa'
  // console.log(o)
}
f(assignA)
// console.log(assignA)
